{include file='public/head'}
<div id="main-page">
    <div class="wap">
        {if $status}
        <div id="cardbox">
          <div class="cardbox">
            <div class="cardleft">
              <p class="cardname textone">{$card['name']}</p>
              {if $card['starttime']}
                {if $card['endtime']}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">{$card['starttime']} ~ {$card['endtime']}</p>
                {elseif $card['term']==0}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">{$card['starttime']} ~ 永久}</p>
                {else}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">{$card['starttime']} ~ {:date('Y-m-d H:i:s', $sale_card['createtime']+$card['term']*86400)}</p>
                {/if}
              {elseif $card['endtime']}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">有效期至：{$card['endtime']}</p>
              {elseif $card['term']==0}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">永久有效</p>
              {else}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">有效期至：{:date('Y-m-d H:i:s', $sale_card['createtime']+$card['term']*86400)}</p>
              {/if}
              <p class="cardcode textone">核销码：{$sale_card['code']}</p>
            </div>
            <div class="cardright">
              {if $sale_card['status']==0}
              <span>未核销</span>
              {else}
              <span class="fc-green">已核销</span>
              {/if}
            </div>
            <div class="cirt"></div>
            <div class="cirb"></div>
          </div>
          <div class="tac">
            <h1>核销成功</h1>
            <hr>
            <p>活动名：{$sale['title']}</p>
          </div>
        </div>
        {else}
        <div class="container tac p-3">
          <h1>核销失败</h1>
        </div>
        {if $sale_card && $sale_verifyer}
        <div class="container p-2">
          <div class="cardbox">
            <div class="cardleft">
              <p class="cardname textone">{$card['name']}</p>
              {if $card['starttime']}
                {if $card['endtime']}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">{$card['starttime']} ~ {$card['endtime']}</p>
                {elseif $card['term']==0}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">{$card['starttime']} ~ 永久}</p>
                {else}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">{$card['starttime']} ~ {:date('Y-m-d H:i:s', $sale_card['createtime']+$card['term']*86400)}</p>
                {/if}
              {elseif $card['endtime']}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">有效期至：{$card['endtime']}</p>
              {elseif $card['term']==0}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">永久有效</p>
              {else}
                <p class="cardterm textone" id="cardterm{$_GPC['id']}">有效期至：{:date('Y-m-d H:i:s', $sale_card['createtime']+$card['term']*86400)}</p>
              {/if}
              <p class="cardcode textone">核销码：{$sale_card['code']}</p>
            </div>
            <div class="cardright">
              {if $sale_card['status']==0}
              <span>未核销</span>
              {else}
              <span class="fc-green">已核销</span>
              {/if}
            </div>
            <div class="cirt"></div>
            <div class="cirb"></div>
          </div>
          <div class="tac">
            <p>活动名：{$sale['title']}</p>
          </div>
        </div>
        {/if}
        {/if}
    </div>
</div>
{include file='public/footer'}